package com.dwin.h5.app.ui.pages;

import android.os.Bundle;

import com.dwin.h5.app.ui.BaseH5Activity;

import org.greenrobot.eventbus.EventBus;

/**
 * 设备详情页面，处理mqtt与http请求
 */
public class DeviceDetailActivity extends BaseH5Activity {
    private static final String TAG = "DeviceDetailActivity";
    private static final int CODE_LOST = 100; // 网络丢失的code


    private String mqttServer, mqttPort;
    private String userTopic;
    private String userSendTopic;
    private String mqttUser;
    private String mqttPw;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EventBus.getDefault().register(this);

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        EventBus.getDefault().unregister(this);
        new Thread(new Runnable() {
            @Override
            public void run() {
//                MqttManager.getInstance().release();
//                mqttHandler.removeMessages(CODE_LOST);
//                mqttHandler = null;

            }
        }).start();
    }

    private void buildMqttConnect(String mqttServer, String mqttPort, String userTopic, String userSendTopic, String mqttUser, String mqttPw) {


    }


}
